<!--
 * @FilePath     : /study_code/html/form-close-submit.html
 * @Description  : 阻止 form 表单的自动提交
 * @Date         : 2025-04-26 08:45:46
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-26 08:45:46
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <form id="theform" action="https://www.baidu.com" method="GET">
      <input type="text" placeholder="请输入内容">
      <button submit>提交</button>
    </form>

    <script>
      theform.onsubmit = function() {
        console.log('触发提交')
        return false
      }
    </script>
  </body>
</html>
